package com.deyuanyun.pic.settings.controller.vo;

import com.github.pagehelper.Page;

/**
 * Created by linwei on 11/10/2016.
 */
public class SettingsBaseVO<T> extends DefaultCommand<T> {

    // 主键
    private String id;
    // 备注
    private String remark;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public void fromDomain(String id, String remark) {
        // 主键
        this.id = id;
        // 备注
        this.remark = remark;
    }

    public <T, E>void converterPage(Page<T> domainList, Page<E> list){
        list.setPageNum(domainList.getPageNum());
        list.setPageSize(domainList.getPageSize());
        list.setTotal(domainList.getTotal());
        list.setPageSizeZero(domainList.getPageSizeZero());
        list.setReasonable(domainList.getReasonable());
    }
}
